package org.hisp.dhis.wsclient.j2me.javarosa;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import org.javarosa.core.JavaRosaServiceProvider;
import org.javarosa.j2me.view.J2MEDisplay;

public class SimpleJRMIDlet
    extends MIDlet
{

    private SimpleJRShell shell;

    protected void destroyApp( boolean arg0 )
        throws MIDletStateChangeException
    {
        // TODO Auto-generated method stub
    }

    protected void pauseApp()
    {
        // TODO Auto-generated method stub
    }

    protected void startApp()
        throws MIDletStateChangeException
    {
        JavaRosaServiceProvider.instance().initialize();
        JavaRosaServiceProvider.instance().setDisplay( new J2MEDisplay( Display.getDisplay( this ) ) );

        shell = new SimpleJRShell();
        shell.setMIDlet( this );
        shell.run();
    }

}
